﻿using System.Data;
using MicropleSoft.WmsApp.Library.ApplicationCache;

namespace MicropleSoft.WmsApp.Library.LookUpInterface
{
    public interface IDataSource
    {
        /// <summary>
        ///  数据源ID
        /// </summary>
        string DataSourceKey { get; set; }

        /// <summary>
        /// 数据源是否存于缓存
        /// </summary>
        bool DataSourceUseCache { get; set; }

        /// <summary>
        /// 获取数据对象
        /// </summary>
        /// <returns>IBaseDataProvider</returns>
        IBaseDataProvider GetBaseDataProvider();

        /// <summary>
        /// 设置数据源
        /// </summary>
        /// <param name="data"></param>
        void SetDataSource(DataTable data);
    }
}
